package com.ruoyi.xiche.controller;

import com.alibaba.nacos.api.model.v2.Result;
import com.ruoyi.xiche.domain.PackagePriceDTO;
import com.ruoyi.xiche.service.ServicePackageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/servicePackage")
public class ServicePackageController {

    @Autowired
    private ServicePackageService servicePackageService;
    @GetMapping("/package-prices/{storeId}")
    public Result<List<PackagePriceDTO>> getPackagePrices(@PathVariable Long storeId) {
        return Result.success(servicePackageService.getPackagePrices(storeId));
    }
}
